<?php

namespace app\model;

use think\Model;

class Xmdj extends Model
{
    public static function getItems()
    {
        return self::where('status', 1)
            ->where('isdelete', 0)
            ->select();
    }

    public function getPosterAttr($value)
    {
        return config('site.imgUrl2') . $value;
    }

    public function imgs()
    {
        return $this->hasMany('XmdjImg', 'pid', 'id');
    }
}
